<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<head>
    <meta charset="UTF-8">
    <title>会员中心</title>
    <style>
        .hander_zx{font-size:18px}.conten{background:#fff;margin-top:10px}.conten ul{overflow:hidden;padding:0;margin:0;border-bottom:1px solid #e5e5e5}.conten_floet li{float:left;list-style:none;line-height:45px;text-align:center;width:100px;cursor:pointer;color:#212121}.active{color:#14d882!important;border-bottom:3px solid #14d882}.push_fx li{float:left;font-size:14px;list-style:none;width:12.5%;text-align:center;background:#f8f8f8;line-height:45px;color:#1f1f1f}.lick_push li{float:left;font-size:14px;width:12.5%;text-align:center;line-height:45px;list-style:none;color:#616161}.lick_push li:last-child{color:#14d882!important}.lick_push li:last-child span:nth-child(1){margin-right:5px}.lick_push li:last-child span{cursor:pointer}
        .mem_ck{
            cursor: pointer;
        }
    </style>
    <link rel="stylesheet" href="../css/paging.css">
</head>
<body style="height:100%;overflow-x: hidden">
<!--//hander-->
<div class="hander_zx" style="margin-top:5px;margin-left:10px;">会员中心</div>
<!--内容-->
<div class="conten">
    <ul class="conten_floet">
        <li class="active">全部</li>
    </ul>
    <div>
        <ul class="push_fx" style="background:#F8F8F8;width: 100%;">
            <li>注册时间</li>
            <li>用户名</li>
            <li>手机号码</li>
            <li>用户资产</li>
            <li>存钱罐</li>
            <li>认养牛</li>
            <li>认养羊</li>
            <li>操作</li>
        </ul>
    </div>
    <!--//数据暂时-->
    <div id="pash_code">
    </div>
    <div class="box" id="box" style="display:none;"></div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/2.1.1-rc2/jquery.min.js"></script>
<script src="../js/paging.min.js"></script>
<script>
    'use strict';$(function(){$.ajax({type:'get',url:'/wf/selectwbusernum',dataType:'json',contentType:"application/json",success:function success(data){c(data,'/wf/selectwbuser')}});function formatDate(now){var now=new Date(now);var year=now.getFullYear();var month=now.getMonth()+1;var date=now.getDate();var hour=now.getHours();var minute=now.getMinutes();var second=now.getSeconds();return year+"-"+fixZero(month,2)+"-"+fixZero(date,2)+" "+fixZero(hour,2)+":"+fixZero(minute,2)+":"+fixZero(second,2)}function fixZero(num,length){var str=""+num;var len=str.length;var s="";for(var i=length;i-->len;){s+="0"}return s+str}function c(data,url_to){if(typeof data.data==='number'&&data.data>0){$("#box").css("display","block")}else{$("#box").css("display","none")}var total=Math.ceil(data.data/24);console.log(total);$('#box').paging({initPageNo:1,totalPages:total,totalCount:'合计'+data.data+'条数据',slideSpeed:600,jump:true,callback:function callback(page){$.ajax({type:'post',url:url_to,dataType:'json',contentType:"application/json",async:false,data:JSON.stringify({currentPage:page,pageCount:24}),success:function success(data){console.log(data);var html='';for(var i=0;i<data.data.length;i++){html+='\n                                    <ul class="lick_push">\n                                        <li class="w_node">'+formatDate(data.data[i].regtime)+'</li>\n                                        <li>'+(data.data[i].username==""?"/":data.data[i].username==null?"/":data.data[i].username)+'</li>\n                                        <li>'+data.data[i].phone+'</li>\n                                        <li>'+data.data[i].total_money+'</li>\n                                        <li>'+data.data[i].sina_money+'</li>\n                                        <li>'+(data.data[i].niunum+"头")+'</li>\n                                        <li>'+(data.data[i].yangnum+"只")+'</li>\n                                        <li class="mem_ck" data-id="'+data.data[i].ID+'">\u67E5\u770B</li>\n                                    </ul>\n                                    '}$("#pash_code").html(html)}})}})}$("#pash_code").on('click','.mem_ck',function(){$.ajax({type:'post',url:'/wf/selectwbuserone',dataType:'json',contentType:"application/json",async:false,data:JSON.stringify({id:$(this).attr("data-id")}),success:function success(data){console.log(data);$('#Member',window.parent.document).css("display","block");$('.regtime',window.parent.document).text(formatDate(data.data.regtime));$('.yhm',window.parent.document).text(data.data.username);$('.sh_phone',window.parent.document).text(data.data.phone);$('.yh_zc',window.parent.document).text(data.data.total_money);$('.yh_cqg',window.parent.document).text(data.data.balance);$('.yh_niu',window.parent.document).text(data.data.niunum+"头");$('.yh_yang',window.parent.document).text(data.data.yangnum+"只");$('.yh_dz',window.parent.document).text(data.data.address)}})})});
</script>
</html>